# Variable inside the file will be referenced as $(). External ones will use ${}
#Make.misc contains general info for the 

TOP = .

include $(TOP)/Make.misc


all: libwasdbase main 

#build Base library
libwasdbase:
	cd Base/lib && ${MAKE}

main: main.${OEXT} 
	${CC} -o $@ $< -I$(TOP)/Base/lib -L$(TOP)/Base/lib -lwasdbase

main.${OEXT}:  main.c 
	${CC} ${CFLAGS} -c $< -o $@
	

.PHONY: clean
clean:
	rm -rf *.o main;\
	cd Base/lib && ${MAKE} clean;
